package day17.myRelect2;

public class Student {
    private String name;
    private  int age;
    public  int money=100;
    public String bir;

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Student() {
        System.out.println("公共的无参构造方法");
    }

    public Student(String name) {
        System.out.println("name的值为"+name);
        System.out.println("私有的有参构造方法");
    }

    public Student(String name, int age) {
        System.out.println("name的值为"+name+"age的值为"+age);
        System.out.println("公共的有参构造方法");
    }
}
